This invention relates to a virtual machine system configured to exclusively dynamically allocate an interrupt timer of a physical CPU to a virtual CPU.
There have been increases in the number of CPU sockets mounted to a computer and the number of CPU cores for each of the CPU sockets. A virtual machine system is available as one of methods of effectively using a computer with such an increased number of CPU cores. The virtual machine system is a platform that enables a virtual machine monitor (or hypervisor) to build a plurality of virtual machines through use of resources included in a physical computer, and enables an operating system to operate independently on each of the virtual machines. Employment of the virtual machine system has become widespread because of advantages that the resources of the physical computer can be effectively utilized, the management and maintenance of software can be facilitated, and the like. A program operating on the virtual machine is specifically referred to as “guest”, and the virtual machine system (for example, virtual machine monitor) is specifically referred to as “host”.
In the virtual machine system, the virtual machine monitor has a shared CPU mode and an exclusive CPU mode as a scheduling mode for the physical CPU. When a small number of physical CPUs of the physical computer were used, it was often the case that the shared CPU mode that allows time-sharing of the physical CPUs by virtual CPUs was used. However, as the number of physical CPUs of the physical computer or the number of CPU cores increases, the exclusive CPU mode that allows each virtual CPU to occupy one specific physical CPU core has become more widespread. The exclusive CPU mode has begun to be used for applications having a strict latency (processing latency) requirement, specifically, an in-memory database, real-time control, and the like.
Those applications frequently use an interrupt timer of a CPU. The interrupt timer of a CPU herein represents a timer included in an interrupt controller built into a CPU motherboard. The timer includes a remaining-time counter configured to decrement a value at a fixed frequency, and has an interval timer function of causing the remaining-time counter to start the decrementing when a value is written to the remaining-time counter and causing the interrupt controller to generate a timer interrupt in the CPU to which the interrupt controller belongs when the value becomes zero and to stop the operation until the next value is written to the remaining-time counter.
In JP 2008-171293 A, there is described a basic method of virtually achieving a timer for a virtual machine through sharing of a timer of a physical computer in a virtual machine system.
In U.S. Pat. No. 7,475,002 B2 and U.S. Pat. No. 8,533,709 B2, there are disclosed methods of virtualizing a timer for catching up with an actual time when a timer of a virtual machine lags behind an actual time in a virtual machine system.
In U.S. Pat. No. 7,707,578 B2, there is disclosed a method of scheduling context to a specific CPU based on how a memory or a cache is accessed.
In U.S. Pat. No. 8,489,699 B2, there is disclosed a method of migrating an I/O exclusively allocated to a virtual machine to be migrated when the virtual machine is migrated between physical computers.